<?php
/**
 * @var $this yii\web\View
 * @var $model webvimark\modules\UserManagement\models\forms\LoginForm
 */

use webvimark\modules\UserManagement\components\GhostHtml;
use webvimark\modules\UserManagement\UserManagementModule;
use daimakuai\captcha\Captcha;
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;

?>

    <?php
    $this->registerCssFile('@web/css/login.css');
    $this->registerCssFile('@web/css/base.css');
    ?>

    <div class="loginBox xy">
        <div class="top">
            <!--<img src="images/logintop.jpg" alt="" />-->
        </div>
        <div class="footer">
            <?php $form = ActiveForm::begin([
                'id' => 'login-form',
                'options' => ['autocomplete' => 'off'],
                'validateOnBlur' => false,
                'enableClientValidation'=>false,
                'fieldConfig' => [
                    'template' => "{input}\n{error}",
                ],
            ]) ?>

            <?= $form->field($model, 'username', ['options' => ['class' => '']])
                ->textInput(['placeholder' => '请输入账号', 'autocomplete' => 'off','class'=>'user']) ?>

            <?= $form->field($model, 'password', ['options' => ['class' => '']])
                ->passwordInput(['placeholder' => '请输入密码', 'autocomplete' => 'off','class'=>'pwd']) ?>

            <?= $form->field($model, 'verifyCode')->widget(Captcha::className(),['name'=>'captchaimg','captchaAction'=>'captcha'])?>

            <?= (isset(Yii::$app->user->enableAutoLogin) && Yii::$app->user->enableAutoLogin) ? $form->field($model, 'rememberMe',['options' => ['class' => '']])->checkbox(['id'=>'jp','label'=>'记住密码','template'=>'<lable class = "labelactive" for="jp">{input}<span> 记住密码</span></label> <br />']) : '' ?>


            <?= Html::submitInput(
                '登录',
                ['class' => 'login']
            ) ?>
            <?php ActiveForm::end() ?>
            <br />
        </div>
    </div>
    </body>
    <?php
    $this->registerJsFile('@web/js/jquery.min.js');
    $this->registerJsFile('@web/js/jquery.cookie.js');
    $this->registerJsFile('@web/js/login.js');
    ?>

<style>
.form-group{
    margin-top: 5px;
}
</style>
<?php
$css = <<<CSS
.form-group{
    margin-top: 5px;
}
.daimakuai-captcha img {
	 display: inline-block;
	cursor: pointer;
}
.form-group {
    margin-top: 0px;
}
.form-control {
    display: block;
    width: 100%;
    height: 30px;
    padding: 12px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #333;
    background-color: #fff;
    background-image: none;
    border: 1px solid #e2e2e2;
    border-radius: 2px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
    -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

#login-form input[type=text], #login-form input[type=password] {
    margin-top: 4px!important;
}
CSS;
$this->registerCss($css);
?>
